
<@override name="content">
<div class="panel panel-default ux-panel">
    <div class="panel-heading">
        <h3 class="panel-title">客户管理</h3>
    </div>

    <div class="panel-body">

        <form id="_queryPageForm">

                <div class="col-sm-3">
                    <input type="text" name="wxid" class="form-control" value="${(queryEntity.wxid)!}">
                </div>
                <div class="col-sm-3">
                    <select name="level" class="form-control">
                        <option value="-1">所有</option>
                        <#list levels as key, value>
                        <option value="${key}" <#if (queryEntity.level)?? && (queryEntity.level == key)> selected </#if> >${value}</option>
                        </#list>
                    </select>
                </div>
                <div class="col-sm-3">
                    <select name="rebateType" class="form-control">
                        <option value="-1">所有</option>
                        <#list rebates as key, value>
                        <option value="${key}" <#if (queryEntity.rebateType)?? && (queryEntity.rebateType == key)> selected </#if> >${value}</option>
                        </#list>
                    </select>
                </div>
                <button type="button" class="btn btn-primary" onclick="doSearch();" >搜索</button>

                <div class="ux-table-div" style="margin-top:15px;">
                    <table class="table table-condensed">
                        <thead>
                        <tr>
                            <th>姓名</th>
                            <th>微信号</th>
                            <th>订单总额</th>
                            <th>总佣金</th>
                            <th>账户余额</th>
                            <th>会员等级</th>
                            <th>佣金等级</th>
                            <th>上级</th>
                            <th>加入时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>

                        <tbody>
                        <#if (page.items)??>
                        <#list page.items as item>
                        <tr>
                            <td>${(item.name)!}</td>
                            <td>${(item.wxid)!}</td>
                            <td>
                                <a href="${base}/customer/orders?customerId=${item.id}" style="text-decoration: underline;" >
                                    ${item.orderMoney!}
                                </a>
                            </td>
                            <td>${(item.rebateMoney)!}</td>
                            <td>${(item.money)!}</td>
                            <td>${(item.levelName)!}</td>
                            <td>${(item.rebateTypeName)!}</td>
                            <td>${(item.parentName)!}</td>
                            <td><#if (item.createAt)??>
                                ${item.createAt?string('yyyy-MM-dd HH:mm')}
                            </#if></td>
                            <td>
                            <a href="${base}/customer/info?id=${item.id}">查看</a>
                            </td>
                        </tr>
                        </#list>
                    </#if>
                    </tbody>
                    </table>
                </div>

                <#if (page.pageTotalCount)?? && page.pageTotalCount gt 1>
                    <ul class="pagination">
                        <input type="hidden" id="_id_pageNum" name="pageNum" value="${page.pageNum}"/>
                        <#list page.showNums as n>
                        <#if page.showDot && n_index == 6>
                        <li class="disabled"><a href="javascript:void(0)">...</a></li>
                        </#if>
                        <#if page.pageNum == n>
                        <li class="active"><a href="javascript:void(0);">${n}</a></li>
                        <#else>
                        <li><a href="javascript:void(0);" onclick="_queryPage('${n}');">${n}</a></li>
                        </#if>
                        </#list>
                    </ul>
                </#if>

        </form>

    </div><!-- panel-body end -->
</div><!-- panel end -->
</@override>

<!-- extends 一定要写在页面最下方 -->
<@extends name="_base.html"/>
